import { messages } from "share/common";
import React from "react";
import { AdvancedTable } from "components";
import DataHOC from "./data-hoc";
import CorporatePaymentReportService from "containers/corporate-payment-report/corporate-payment-report.service";

@DataHOC
class OutstandingBusiness extends React.Component {
  componentDidMount() {
    this.props.onRef && this.props.onRef(this);
  }

  service = (page, size, searchParams) => {
    return CorporatePaymentReportService.getOutstandingBusinessList(page, size, searchParams);
  };

  render() {
    return (
      <AdvancedTable
        title={messages("finance-9.key140") /*未结业务查看*/}
        tableName="outstanding-business"
        service={this.service}
        loading={this.props.loading}
        onRef={(ref) => (this.advancedTableRef = ref)}
        searchForm={this.props.searchForm}
        columns={this.props.columns}
        rowKey="paymentScheduleId"
      />
    );
  }
}

export default OutstandingBusiness;
